<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>百朋后台管理系统</title>
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/demo.css">
    <script type="text/javascript" src="__PUBLIC__/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/easyui/jquery.easyui.min.js"></script>
</head>
<body>
<div class="report_table">
    <table id="report_table" title="Client Side Pagination" style="width:100%;height:405px" data-options="
                        rownumbers:true,
                        singleSelect:true,
                        autoRowHeight:false,
                        pagination:true,
                        pageSize:10,toolbar:'#tb',
                        onClickRow: onClickRow">
        <thead data-options="frozen:true">
        <tr>
            <th field="cust_name" width="10%" editor='textbox'>客户姓名</th>
            <th field="identity_number" width="15%" editor='textbox'>客户身份证</th>
        </tr>
        </thead>
        <thead>
        <tr>
            <th field="identity_type" width="10%" data-options="
                      formatter:function(value,row){
							return value;
						},
						editor:{
							type:'combobox',
							options:{
								valueField:'type_code',
								textField:'typename',
								method:'get',
								url:'../../Common/Common/identity_type'
							}
						}">证件类型</th>
            <th field="cust_sex" width="10%" data-options="
                      formatter:function(value,row){
							return value;
						},
						editor:{
							type:'combobox',
							options:{
								valueField:'sex_status',
								textField:'sex_name',
								data:[{'sex_status':'0','sex_name':'未知的性别'},{'sex_status':'1','sex_name':'男性'},{'sex_status':'2','sex_name':'女性'},{'sex_status':'9','sex_name':'未说明性别'}]
							}
						}">客户性别</th>
            <th field="birth_date" width="10%" editor='numberbox'>出生年月</th>
            <th field="marry_status" width="10%" data-options="
                      formatter:function(value,row){
							return value;
						},
						editor:{
							type:'combobox',
							options:{
								valueField:'m_code',
								textField:'m_name',
								method:'get',
								url:'../../Common/Common/marray_status'
							}
						}">婚姻状况</th>
            <th field="education_status" width="10%" data-options="
                      formatter:function(value,row){
							return value;
						},
						editor:{
							type:'combobox',
							options:{
								valueField:'edu_code',
								textField:'edu_name',
								method:'get',
								url:'../../Common/Common/education_status'
							}
						}">最高学历</th>
            <th field="degree_status" width="10%" data-options="
                      formatter:function(value,row){
							return value;
						},
						editor:{
							type:'combobox',
							options:{
								valueField:'deg_code',
								textField:'deg_name',
								method:'get',
								url:'../../Common/Common/degree_status'
							}
						}">最高学位</th>
            <th field="address_phone" width="10%" editor='textbox'>住宅电话</th>
            <th field="telephone" width="10%" editor='numberbox'>手机号码</th>
            <th field="company_phone" editor='textbox'>单位电话</th>
            <th field="cust_email" width="10%" editor='textbox'>电子邮箱</th>
            <th field="communication_address" width="10%" editor='textbox'>通讯地址</th>
            <th field="communication_postcode" width="10%" editor='numberbox'>通讯地址邮编</th>
            <th field="register_address" width="10%" editor='textbox'>户籍地址</th>
            <th field="mate_name" width="10%" editor='textbox'>配偶姓名</th>
            <th field="mate_identitytype" width="10%" data-options="
                      formatter:function(value,row){
							return value;
						},
						editor:{
							type:'combobox',
							options:{
								valueField:'type_code',
								textField:'typename',
								method:'get',
								url:'../../Common/Common/identity_type'
							}
						}">配偶证件类型</th>
            <th field="mate_identitynumber" width="10%" editor='textbox'>配偶证件号码</th>
            <th field="mate_commpany" width="10%" editor='textbox'>配偶工作单位</th>
            <th field="mate_phone" width="10%" editor='numberbox'>配偶联系电话</th>
            <th field="first_linkman_name" width="10%" editor='textbox'>第一联系人姓名</th>
            <th field="first_linkman_type" width="10%" data-options="
                      formatter:function(value,row){
							return value;
						},
						editor:{
							type:'combobox',
							options:{
								valueField:'r_code',
								textField:'r_name',
								method:'get',
								url:'../../Common/Common/relation_status'
							}
						}">第一联系人关系</th>
            <th field="first_linkman_phone" width="10%" editor='numberbox'>第一联系人手机号码</th>
            <th field="second_linkman_name" width="10%" editor='textbox'>第二联系人姓名</th>
            <th field="second_linkman_type" width="10%" data-options="
                      formatter:function(value,row){
							return value;
						},
						editor:{
							type:'combobox',
							options:{
								valueField:'r_code',
								textField:'r_name',
								method:'get',
								url:'../../Common/Common/relation_status'
							}
						}">第二联系人关系</th>
            <th field="second_linkman_phone" width="10%" editor='numberbox'>第二联系人手机号码</th>
            <th field="profession_status" width="10%" data-options="
                      formatter:function(value,row){
							return value;
						},
						editor:{
							type:'combobox',
							options:{
								valueField:'pos_code',
								textField:'pos_name',
								method:'get',
								url:'../../Common/Common/profession_status'
							}
						}">职业</th>
            <th field="company_name" width="10%" editor='textbox'>单位名称</th>
            <th field="industry_status" width="10%" data-options="
                      formatter:function(value,row){
							return value;
						},
						editor:{
							type:'combobox',
							options:{
								valueField:'code',
								textField:'name',
								method:'get',
								url:'../../Common/Common/industry_status'
							}
						}">单位所属行业</th>
            <th field="company_address" width="10%" editor='textbox'>单位地址</th>
            <th field="company_postcode" width="10%" editor='numberbox'>单位地址邮政编码</th>
            <th field="work_date" width="10%" editor='numberbox'>本单位工作起始年份</th>
            <th field="duty_status" width="10%" data-options="
                      formatter:function(value,row){
							return value;
						},
						editor:{
							type:'combobox',
							options:{
								valueField:'du_code',
								textField:'du_name',
								method:'get',
								url:'../../Common/Common/duty_status'
							}
						}">职务</th>
            <th field="title_status" width="10%" data-options="
                      formatter:function(value,row){
							return value;
						},
						editor:{
							type:'combobox',
							options:{
								valueField:'ti_code',
								textField:'ti_name',
								method:'get',
								url:'../../Common/Common/title_status'
							}
						}">职称</th>
            <th field="annual_income" width="10%" editor='numberbox'>年收入</th>
            <th field="live_address" width="10%" editor='textbox'>居住地址</th>
            <th field="live_postcode" width="10%" editor='numberbox'>居住地址邮编</th>
            <th field="live_status" width="10%" data-options="
                      formatter:function(value,row){
							return value;
						},
						editor:{
							type:'combobox',
							options:{
								valueField:'li_code',
								textField:'li_value',
								method:'get',
								url:'../../Common/Common/live_status'
							}
						}">居住状况</th>
        </tr>
        </thead>
    </table>
</div>
<div id="tb" style="padding:5px;height:auto">
    <div style="margin-bottom:5px">
        <a href="javscript:;" onclick="exportReport2();" class="easyui-linkbutton" iconCls="icon-print" plain="true">导出</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="append()">新增</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" onclick="accept()">确认</a>
    </div>
    <form action="../personreport/person_unline" method="post" id="searchTable">
        <div>
            客户创建时间: <input id="month_time" name="month_time" data-options="required:true" value="{$search_array.month_time}">
            客户姓名: <input class="easyui-textbox" name="select_name" id="select_name" value="{$search_array.select_name}" data-options="prompt:'搜索姓名...'" style="width:150px"></input>
            <a href="javascript:;" onclick="submitSearch();" class="easyui-linkbutton" iconCls="icon-search">查询</a>
            <a href="javascript:;" onclick="resetSearch();" class="easyui-linkbutton" iconCls="icon-clear">重置</a>
        </div>
    </form>
</div>
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/report/person_report.js"></script>
<script>
    $(function(){
        var json='{$report_json}';
        var array=eval('('+json+')');
        console.log(array);
        $('#report_table').datagrid({loadFilter:pagerFilter}).datagrid('loadData', array);
    });

</script>
</body>
</html>